package com.zking.entity;

import com.zking.util.Tools;

import java.io.IOException;
import java.io.InputStream;

public class HistoryItem {

    private int id;
    private String eu_user_id;
    private int ep_id;
    private String ep_name;
    private byte[] ep_image;


    public HistoryItem(int id, String eu_user_id, int ep_id, String ep_name, byte[] ep_image){
        this.id = id;
        this.eu_user_id = eu_user_id;
        this.ep_id = ep_id;
        this.ep_name = ep_name;
        this.ep_image = ep_image;
    }

    public HistoryItem(int id, String eu_user_id, int ep_id, String ep_name, InputStream ep_image) throws IOException {
        this.id = id;
        this.eu_user_id = eu_user_id;
        this.ep_id = ep_id;
        this.ep_name = ep_name;
        this.ep_image = Tools.InputStreamToByte(ep_image);
    }

    public HistoryItem(){

    }

    public byte[] getEp_image() {
        return ep_image;
    }

    public void setEp_image(byte[] ep_image) {
        this.ep_image = ep_image;
    }

    @Override
    public String toString() {
        return "HistoryItem{" +
                "id='" + id + '\'' +
                ", eu_user_id='" + eu_user_id + '\'' +
                ", ep_id='" + ep_id + '\'' +
                ", ep_name='" + ep_name + '\'' +
                '}';
    }

    public String getEp_name() {
        return ep_name;
    }

    public void setEp_name(String ep_name) {
        this.ep_name = ep_name;
    }



    public String getEu_user_id() {
        return eu_user_id;
    }

    public void setEu_user_id(String eu_user_id) {
        this.eu_user_id = eu_user_id;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getEp_id() {
        return ep_id;
    }

    public void setEp_id(int ep_id) {
        this.ep_id = ep_id;
    }
}
